<style>
.logo {display:inline-block;vertical-align:middle;-webkit-transform:translateZ(0);transform:translateZ(0);box-shadow:0 0 1px rgba(0,0,0,0);-webkit-backface-visibility:hidden;backface-visibility:hidden;-moz-osx-font-smoothing:grayscale;-webkit-transition-duration:0.5s;transition-duration:0.5s;}
.logo:hover,.logo:focus,.logo:active {-webkit-transform:scale(1.1);transform:scale(1.1);-webkit-transition-timing-function:cubic-bezier(0.47,2.02,0.31,-0.36);transition-timing-function:cubic-bezier(0.47,2.02,0.31,-0.36);}
/*header { background: url('/static/blog/tkbg.png') no-repeat; background-size:100% auto; }*/
</style>
<header class="w-100" style="z-index:999;">
  <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
    <a class="navbar-brand p-0" href="{:url('index/blog')}">
      <img class="logo" src="/static/blog/mainlogo.png" alt="梦幻空间站">
    </a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>

    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav mr-auto">
        {present name="main_nav_menu"}
        {volist name="main_nav_menu" id="value" key="k"}
          {notpresent name="value.zclass"}
          <li class="nav-item {if $menu==$value['id']}active{/if}">
            <a class="nav-link" href="{$value.href}" {$value.tg}>{$value.name}</a>
          </li>
          {else /}
          <li class="nav-item dropdown {if $menu==$value['id']}active{/if}">
            <a class="nav-link dropdown-toggle" href="{$value.href}" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
              {$value.name}
            </a>
            <div class="dropdown-menu" aria-labelledby="navbarDropdown">
              {volist name="value.zclass" id="vol"}
              <a class="dropdown-item" href="{$vol.href}" {$vol.tg}>{$vol.name}</a>
              {/volist}
            </div>
          </li>
          {/notpresent}
        {/volist}
        {/present}
        
          <!-- <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
              其他页面
            </a>
            <div class="dropdown-menu" aria-labelledby="navbarDropdown">
              <a class="dropdown-item" href="{:url('/idcard/index/dm/index')}" target="_blank">IDCard</a>
              <a class="dropdown-item" href="{:url('other/demo_substr')}" target="_blank">php内置函数</a>
              <div class="dropdown-divider"></div>
              <a class="dropdown-item" href="{:url('other/demo_yibu')}" target="_blank">伊布</a>
              <a class="dropdown-item" href="{:url('other/demo_leida')}" target="_blank">雷达</a>
              <a class="dropdown-item" href="{:url('other/demo_action404')}" target="_blank">动画404</a>
            </div>
          </li> -->
          {notempty name="user"}
          <li class="nav-item {if $Request.controller=='Link'&&$Request.action!='link'}active{/if}">
            <a class="nav-link" href="{:url('link/index',array('groupId'=>-1))}">链接管理</a>
          </li>
          <li class="nav-item {if $Request.controller=='Article'&&$Request.action!='article'&&$Request.action!='article_column'}active{/if}">
            <a class="nav-link" href="{:url('article/index',array('groupId'=>-1))}">文章管理</a>
          </li>
          {/notempty}
      </ul>
      {//****************搜索框****************}
      <form class="form-inline" action="/search" method="get">
        <div class="input-group">
          <div class="input-group-prepend">
            <select class="custom-select" name="type">
              <option value="1" selected>全站搜索</option>
              <option value="2">我的文章</option>
              <option value="3">我的链接</option>
            </select>
          </div>
          <input type="search" class="form-control" placeholder="请善用搜索功能……" name="keys">
          <div class="input-group-prepend">
            <button class="btn btn-outline-success" type="submit">搜索</button>
          </div>
        </div>
      </form>
      {//****************搜索框****************}
      {//***************用户信息***************}
      {if empty($user)}
        <div class="btn-group mx-2" role="group">
          <a href="{:url('login/login')}" class="btn btn-outline-primary">登录</a>
          <a href="{:url('login/register')}" class="btn btn-outline-info">注册</a>
        </div>
      {else /}
      <div class="btn-group mx-2">
        <div class="btn-group dropleft" role="group">
          <div class="dropdown-menu">
            <p class="text-center">{$user.nick}</p>
            {if 1>2}
            <p class="p-4 text-muted">{notempty name="$user.autograph"}{$user.autograph}{/notempty}</p>
            {/if}
            <div class="dropdown-divider"></div>
            <h6 class="dropdown-header">写文章</h6>
            <a class="dropdown-item" href="{:url('article/writer')}" target="_blank">写文章</a>
            <a class="dropdown-item" href="{:url('article/writer',array('editortype'=>'editormd'))}" target="_blank">Markdown编辑器</a>
            <a class="dropdown-item" href="{:url('article/writer',array('editortype'=>'ckeditor5'))}" target="_blank">CKEditor5编辑器</a>
            <a class="dropdown-item" href="{:url('article/writer',array('editortype'=>'handyeditor'))}" target="_blank">HandyEditor编辑器</a>
            <div class="dropdown-divider"></div>
            <a class="dropdown-item" href="{:url('article/writer')}" target="_blank">个人中心</a>
            <div class="dropdown-divider"></div>
            <a class="dropdown-item disabled" href="#" tabindex="-1" aria-disabled="true">用户管理</a>
            {notpresent name="user['tr']"}
            <a class="dropdown-item" href="{:url('login/login')}" target="_blank">添加另一个账号</a>
            {foreach name="$user.other" item="vol" key="k" }
            <a class="dropdown-item" href="{:url('login/turn_login',array('uid'=>$vol[0]))}">切换：{$vol.1}</a>
            {/foreach}
            <a class="dropdown-item" href="{:url('login/logout')}">退出登录</a>
            {else /}
            <a class="dropdown-item" href="{:url('login/register')}">注册此账号</a>
            {/notpresent}
          </div>
        </div>
        <img src="{$user.hport|default='/static/main/noavatar_small.gif'}" class="round ml-1" width="38" height="38" style="cursor:pointer;"
        data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
      </div>
      {/if}
      {//***************用户信息***************}
      <button class="btn btn-outline-secondary btn-sm" type="button" data-toggle="collapse" data-target="#navToggleExt">
        <span class="navbar-toggler-icon"></span>
      </button>
    </div>
  </nav>

  <div class="collapse bg-dark" id="navToggleExt">
    <div class="p-4">
      <h5 class="text-white h4">超级管理员 - {$user.nick}</h5>
      <span class="text-muted">{notempty name="$user.autograph"}{$user.autograph}{/notempty}</span>
    </div>
  </div>

</header>